<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
		<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
		<h1 class="title ui-widget-header ui-corner-all">#{message['mantenimiento.empleadosporempresa.tittle']}</h1>
		<h:form id="frmDetEmpresaEmpleadoForm">
			<p:growl id="message" showDetail="true" />
			
			<h:panelGrid id="display" columns="2" >
				
				<h:outputText value="#{message['detempresaEmpl.empresa']}" />
				<p:selectOneMenu size="1" value="#{detEmpresaEmpleadoForm.idEmpresa}" filter="true" filterMatchMode="startsWith"
					required="true" style="width:200px"
					requiredMessage="#{message['contrato.ubigeo.departamento.validation']}" >
					<f:selectItem itemLabel="Seleccione empresa" itemValue="#{null}" />
					<f:selectItems value="#{comboAction.empresaitems}" />
				</p:selectOneMenu>
				
				<h:outputText value="#{message['detempresaEmpl.empleados']}" />
				<p:selectCheckboxMenu id="emple" value="#{detEmpresaEmpleadoForm.empleadosList}" filter="true" filterMatchMode="startsWith"
					required="true" style="width:200px"
					requiredMessage="#{message['DetEmpresaEmpleado.empleado.validation']}" >
					<f:selectItem itemLabel="Seleccione empleado" itemValue="#{null}" />
					<f:selectItems value="#{comboAction.empleadoItems}" />
				</p:selectCheckboxMenu>
				</h:panelGrid>
				
				<h:outputText value="Es líder? " />
				<p:selectBooleanCheckbox
					value="#{detEmpresaEmpleadoForm.lider}">
					<p:ajax update="message" />
				</p:selectBooleanCheckbox>
				
				<h:panelGroup>
					<p:commandButton value="Guardar" action="#{detEmpresaEmpleadoForm.insertar}"  
						icon="ui-icon ui-icon-disk" />
				</h:panelGroup>
		</h:form>
	</ui:define>
</ui:composition>